package com.example.springbootfreemarker.controller;

import com.example.springbootfreemarker.pojo.Users;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;

import java.util.ArrayList;
import java.util.List;

/**
 * @ClassName UserController
 * @Description UserController
 * @Author ZX
 * @Date 2020/5/26
 */
@Controller
public class UserController {
    /**
     * @Description: 处理请求
     * @Param:
     * @return:
     */
    @GetMapping("/showUsers")
    public String showUser(Model model){
        System.out.println("asdasdasdasd");
        List<Users> list = new ArrayList<>();
        list.add(new Users("admin","女","32"));
        list.add(new Users("hhh","男","145"));
        list.add(new Users("测试","男","15"));
        model.addAttribute("aaa",list);
        return "usersList";
    }
}
